<?php
	session_start();
	require('include/inc.start.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<?php include ('common_head.html'); ?>
		<?php include ('register_head.html'); ?>
		<link href="css/index.css" rel="stylesheet" type="text/css" />
		<title>Welcome to Getub! - The UMass Network</title>
	</head>
	<body>
		<div class="back">
			<div class="footerBg">
				<div id="frame">
					<!-- will need to use "target="_blank" to show lightbox confirmation -->
					<form id="registerForm" name="registerForm" method="post" action="save_profile.php">
						<?php include("include/postdata.php"); ?>
						<?php include ('header.php'); ?>
						<div class="mainfrm">
<?php

	$states = array(
		'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI',
		'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI',
		'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC',
		'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT',
		'VT', 'VA', 'WA', 'WV', 'WI', 'WY'
	);

	$universities = array('UMass Amherst', 'UMass Boston', 'UMass Dartmouth', 'UMass Lowell', 'UMass Worcester Medical');

?>
							<div class="formframe">
								<div class="formheading1"></div>
								<div class="formsection">
									<div class="formrowrg">
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">First Name<span style="color:#FF9000">* </span></span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['firstName'] ?>" class="textbox required validate-alpha" id="firstName" name="firstName" type="text" style="width:260px;"  maxlength="35" />
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">Last Name<span style="color:#FF9000;">* </span></span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['lastName'] ?>" class="textbox required validate-alpha" id="lastName" name="lastName" type="text" style="width:260px;" maxlength="35"/>
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">Phone</span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['phone'] ?>" class="phone" name="phone" id="phone" type="text" maxlength="15" />
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
									</div>
									<div class="formrowrg">
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">
													<span style="margin-left:19px;">Address</span>
													<span style="color:#FF9000;">* </span>
												</span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['address'] ?>" class="required" id="address" name="address" type="text" style="width:260px;" maxlength="40"/>
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">
													<span style="margin-left:19px;">City</span>
													<span style="color:#FF9000;">* </span>
												</span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['city'] ?>" class="required validate-alpha" id="city" name="city" type="text" style="width:260px;" maxlength="25" />
												</span>
												<span class="right"></span></div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">
													<span style="margin-left:19px;">State</span>
													<span style="color:#FF9000;">* </span>
												</span>
												<span class="left"></span>
												<span class="center">
													<label>
														<select id="state" name="state" class="dropboxstate" >
															<?php
																foreach ($states as $one) {
																	echo '<option'
																		. ($_SESSION['state'] == $one ? ' selected="selected"' : '')
																		. '>' . $one . '</option>';
																}
															?>
														</select>
													</label>
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm_zip">
											<span class="labelzip">Zip Code<span style="color:#FF9000;">*</span></span>
										</div><!--fieldfrm-->
										<input value="<?= $_SESSION['zipCode'] ?>" class="required validate-number textboxzip" id="zipCode" name="zipCode" type="text" style="width: 90px; margin-top:11px;" maxlength="5" />
									</div><!-- End formrowrg right-->
								</div><!--end of formsection1-->
								<div class="formheading2"></div>
								<div class="formsection">
									<div class="formrowrg">
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">Email<span style="color:#FF9000">* </span></span>
												<span class="left"></span>
												<span class="center">
													<input value="<?= $_SESSION['email'] ?>" class="required validate-email" id="email" name="email" type="text" style="width:260px;" maxlength="40" />
												</span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">Your UMass<span style="color:#FF9000">* </span></span>
												<span class="left"></span>
												<span class="center">
													<label id="university_label">
														<select name="university" id="university" class="dropbox required" style="width:260px;" >
															<?php
																foreach ($universities as $one) {
																	echo '<option value="' . $one . '"'
																		. ($_SESSION['university'] == $one ? ' selected="selected"' : '')
																		. '>' . $one . '</option>';
																}
															?>
														</select>
													</label>
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
									</div><!--end of left col section 2-->
									<div class="formrowrg">
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label">
													<span  style="margin-left:19px;">New Password</span>
												</span>
												<span class="left"></span>
												<span class="center">
													<input value="******" class="required validate-password" id="password" name="password" type="password" style="width:260px;" />
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
										<div class="fieldfrm">
											<div class="textboxfrm">
												<span class="label2">Confirm New Password</span>
												<span class="center">
													<input value="******" class="other confirmPass" type="password" id="confirmPass" name="confirmPass" style="width:260px;" maxlength="30"/>
												</span>
												<span class="right"></span>
											</div>
										</div><!--fieldfrm-->
									</div><!--end of right col section 2 -->
								</div><!--end of formsection2-->
								<div class="submitfrm">
									<script type="text/javascript">var valid = new Validation('registerForm', {immediate: true});</script>
									<input type="submit" value="Save" name="Submit" id="submit" /></div>
							</div><!--end of formsection3-->
						</div><!--formlftcol-->
						<?php include("footer.php"); ?>
					</form>
				</div><!--mainfrm -->
			</div><!--frame-->
		</div><!--footerBg-->
		</div><!--back -->
	</body>
</html>